﻿<%@ Page Theme="BlueSkin" Title="LMS : Reports" Language="C#" MasterPageFile="~/LmsWebSite/MasterEN.master" AutoEventWireup="true" CodeFile="ReportsEN.aspx.cs" Inherits="ReportsEN" %>





<%--<%@ Register Assembly="CrystalDecisions.Web" Namespace="CrystalDecisions.Web" TagPrefix="CR" %>--%>



<%@ Register src="MyCalender.ascx" tagname="MyCalender" tagprefix="uc1" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    
 <asp:UpdatePanel ID="up1" runat="server" >
    <ContentTemplate>
        <asp:UpdateProgress ID="uprogress1" runat="server">
            <ProgressTemplate>
            
                <div style="position:fixed;width:30px;height:30px;top:0px;right:0px;border:1px solid orange;">
                    <img src="images/loading.gif" style="width:30px;height:30px;"  alt='Loading' title='Loading'/>
                </div>
            </ProgressTemplate>
        </asp:UpdateProgress>   
    
        
        
        
        
<table cellspacing="5" cellpadding="5" width="100%">
        <tr>
            <td align="left" class="heading">
                Reports
            </td>
        </tr>
    </table>
    <br />
    <div runat="server" id="dvSelectReportType" class="aligning allWidthWithMargins  direction" style="margin-bottom:20px;margin-left:30px;margin-right:30px;font-size:14px;">
        <div class="floating aligning direction" style="width:200px;">
            <asp:Label  runat="server" Text="Report *"></asp:Label>
        </div>        
        
        
       <div class="floating aligning direction" style="width:400px;">
           
           <asp:DropDownList ID="ddlReports" runat="server" AutoPostBack="true" 
               Width="400px" onselectedindexchanged="ddlReports_SelectedIndexChanged">
        </asp:DropDownList>
           
        </div>  
       <div class="floating aligning direction" >
          
        </div>
    
    
    
    </div>

    <div class="clearing" style="height:10px;"></div>


    <div runat="server" id="dvNoOfParticipationCoursesForEmployees" class="aligning allWidthWithMargins  direction" style="margin-bottom:20px;margin-left:30px;margin-right:30px;font-size:14px;">
        
        <div class="floating aligning direction" style="width:200px;">
            <asp:Label ID="lblDateFrom" runat="server" Text="Date from *"></asp:Label>
        </div>        
        
       <div class="floating aligning direction" style="width:250px;">
           
           <uc1:MyCalender ID="mcDateFrom" runat="server" />
           
        </div>  
       <div class="floating aligning direction" >
          
        </div>
        
        <div class="clearing" style="width:1px;height:10px;"></div>


        <div class="floating aligning direction" style="width:200px;">
            <asp:Label ID="lblDateTo" runat="server" Text="Date To *"></asp:Label>
        </div>        
        
       <div class="floating aligning direction" style="width:250px;">
           
           <uc1:MyCalender ID="mycDateTo" runat="server" />
           
        </div>  
       <div class="floating aligning direction" >
          
        </div>
        
        <div class="clearing" ></div>
                  

    </div>

    <div class="clearing"></div>

    <div class="allWidthWithMargins direction aligning" style="margin-left:30px;margin-right:30px;" runat="server" id="dvFamily">
        <div class="floating aligning direction" style="width:200px;">
            <asp:Label ID="lblFamilyHead" runat="server" Text="Family/Employee"></asp:Label>
        </div>        
        
       <div class="floating aligning direction" style="width:250px;">
           
           <asp:RadioButton ID="rbFamily" runat="server" GroupName="FamilyEmp" Text="Family" Checked="false" />
           <asp:RadioButton ID="rbEmployee" runat="server" GroupName="FamilyEmp" Text="Employee" Checked="True" />
           
        </div>  

    
        <div class="clearing" style="height:10px;"></div>
    </div>
    <div class="clearing"></div>

    <div runat="server" visible="false" id="dvYearReports" class="aligning allWidthWithMargins  direction" style="margin-bottom:20px;margin-left:30px;margin-right:30px;font-size:14px;">
        
        <div class="floating aligning direction" style="width:200px;">
            <asp:Label runat="server" Text="Year *"></asp:Label>
        </div>        
        
       <div class="floating aligning direction" style="width:250px;">
           
           <asp:TextBox ID="txtYear" runat="server" Width="240px"></asp:TextBox>
           
        </div>  
       <div class="floating aligning direction" >
           <asp:RegularExpressionValidator ID="rfvTextYear" runat="server" ErrorMessage="Year must be a number." ControlToValidate="txtYear" ValidationExpression="[0-9]+" >*</asp:RegularExpressionValidator>
            <asp:CompareValidator ID="cvTextYearSmaller" runat="server" ErrorMessage="Year must be before  2200" ControlToValidate="txtYear" ValueToCompare="2200" Operator="LessThan">*</asp:CompareValidator>
            <asp:CompareValidator ID="cvTextYearbigger" runat="server" ErrorMessage="Year must be After  2000" ControlToValidate="txtYear" ValueToCompare="2000" Operator="GreaterThan">*</asp:CompareValidator>
           <asp:RequiredFieldValidator ID="requiredTextYear" runat="server" ErrorMessage="You must enter a year" ControlToValidate="txtYear">*</asp:RequiredFieldValidator>
        
        </div>
        
        
        
        
        <div class="clearing" style="width:1px;height:20px;"></div>
                  

    </div>

    <div class="clearing" ></div>
    <div runat="server" visible="false" id="dvReportCourses" class="aligning allWidthWithMargins  direction" style="margin-bottom:20px;margin-left:30px;margin-right:30px;font-size:14px;">
    
    
        <div class="floating direction aligning" style="width:100px">
            <asp:Label runat="server" Text="Course Name "></asp:Label>
        
        </div>
        
        <div class="floating direction aligning" style="width:300px;">
            <asp:TextBox ID="txtSearch" runat="server" Width="300px"></asp:TextBox>
           
        </div>
        <div class="floating" style="font-size:1px;width:11px;height:1px;"></div>
        <div class="floating direction aligning" style="width:100px;">
            <asp:Button ID="btnSearch" runat="server" Text="Search" 
                onclick="btnSearch_Click" BorderStyle="Solid" BorderColor="Orange" BackColor="DarkOrange" ForeColor="White"/>
        
        </div>
            
        
        
        <div class="clearing" style="height:10px"></div>

        <div class="aligning allWidthWithMargins floating direction">
            <asp:GridView DataKeyNames="ID" ID="grdUsers" runat="server" 
                AutoGenerateColumns="False" AllowPaging="True" Font-Size="12px" 
                onpageindexchanging="grdUsers_PageIndexChanging" Width="840px" 
                onrowediting="grdUsers_RowEditing" EnableModelValidation="True">
                <HeaderStyle HorizontalAlign="Center"/>

                <RowStyle HorizontalAlign="Center" />
                
                <EmptyDataTemplate>
                <div class="aligning floating direction" style="width:840px;">
                    <asp:Label ID="Label2" runat="server" Text="Label" >No Courses found</asp:Label> 
                    <br />
                    <br />
                    
                </div>
                    
                </EmptyDataTemplate>
                <Columns>
                    <asp:TemplateField HeaderStyle-CssClass="gridRowStyle" ItemStyle-CssClass="gridRowStyle">
                        <HeaderTemplate>
                            <asp:Label ID="lblCourseNameARHead" runat="server" Text="Arabic Name" Width="120px" ></asp:Label>
                        </HeaderTemplate>
                        <ItemTemplate>
                            
                           <asp:Label ID="lblCourseNameARItem" runat="server" Text='<%#  Eval ("CourseNameAR") %>' Width="120px" style="margin-top:10px;margin-bottom:10px;"></asp:Label>
                                                     
                        </ItemTemplate>

<HeaderStyle CssClass="gridRowStyle"></HeaderStyle>

<ItemStyle CssClass="gridRowStyle"></ItemStyle>
                    </asp:TemplateField>
                    
                    <asp:TemplateField>
                        <HeaderTemplate>
                            <asp:Label ID="lblCourseNameENHead" runat="server" Text="English Name" Width="120px"></asp:Label>
                        </HeaderTemplate>
                        <ItemTemplate>
                           <asp:Label ID="lblCourseNameENItem" runat="server" Text='<%#  Eval ("CourseNameEN") %>' Width="120px"></asp:Label>
                                                     
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField>
                        <HeaderTemplate>
                            <asp:Label ID="lblFolderName" runat="server" Text="Course type" Width="120px"></asp:Label>
                        </HeaderTemplate>
                        <ItemTemplate>
                            
                           <asp:Label ID="lblFolderName" runat="server" Text='<%# ((DatabaseComponent.Courses)(Container.DataItem)).objFolder.objMostParent.FolderNameEN %>' Width="120px"></asp:Label>
                                                     
                        </ItemTemplate>
                    </asp:TemplateField>
                    
                    
                    
                    
                     <asp:TemplateField>
                        <HeaderTemplate>
                            <asp:Label ID="lblDurationHead" runat="server" Text="Duration" Width="80px"></asp:Label>
                        </HeaderTemplate>
                        <ItemTemplate>
                           <asp:Label ID="lblDurationItem" runat="server" Text='<%#  GlobalVars.setSecounds ((long?)Eval ("Duration")) %>' Width="80px"></asp:Label>
                                                     
                        </ItemTemplate>
                    </asp:TemplateField>
                    
                    
                    
                   
                    
                    
                    
                    <asp:TemplateField>
                        <HeaderTemplate>
                                <asp:Label ID="lblActionsHead" runat="server" Text="Action" ></asp:Label>
                        </HeaderTemplate>
                        <ItemTemplate>
                           
                               
                                
                                 <asp:LinkButton ID="lnkReport" runat="server" CommandName="Edit" CommandArgument='<%# Container.DataItemIndex %>'   Text="View Report" CausesValidation="false"></asp:LinkButton>
                                  
                                                 
                        </ItemTemplate>
                        
                        
                    </asp:TemplateField>
                    
                    
                    
                    
                    
                        
                           
                        
               
                
                
                
                </Columns>
                
                
            </asp:GridView>
        </div>
        
        
        
        
        <div class="clearing"></div>
    
    </div>
    
    


    <div class="clearing" ></div>
    <div runat="server" visible="false" id="dvUsersReports" class="aligning allWidthWithMargins  direction" style="margin-bottom:20px;margin-left:30px;margin-right:30px;font-size:14px;">
    
    
                
        <div class="floating direction aligning" style="width:300px;">
            <asp:TextBox ID="txtSearchUser" runat="server" Width="300px"></asp:TextBox>
           
        </div>
        <div class="floating" style="font-size:1px;width:11px;height:1px;"></div>
        <div class="floating direction aligning" style="width:100px;">
            <asp:Button ID="btnSearchUser" runat="server" Text="Search" 
                 BorderStyle="Solid" BorderColor="Orange" BackColor="DarkOrange" 
                ForeColor="White" onclick="btnSearchUser_Click"/>
        
        </div>
            
        
        
        <div class="clearing" style="height:10px"></div>

        <div class="aligning allWidthWithMargins floating direction">
            <asp:GridView DataKeyNames="GenID" ID="grdPersons" runat="server" 
                AutoGenerateColumns="False" AllowPaging="True" Font-Size="12px" 
                 Width="840px" onpageindexchanging="grdPersons_PageIndexChanging" 
                onrowediting="grdPersons_RowEditing" EnableModelValidation="True" >
                <HeaderStyle HorizontalAlign="Center"/>

                <RowStyle HorizontalAlign="Center" />
                
                <EmptyDataTemplate>
                <div class="aligning floating direction" style="width:840px;">
                    <asp:Label ID="Label2" runat="server" Text="Label" >No Users found</asp:Label> 
                    <br />
                    <br />
                    
                </div>
                    
                </EmptyDataTemplate>
                <Columns>
                    <asp:TemplateField HeaderStyle-CssClass="gridRowStyle" ItemStyle-CssClass="gridRowStyle">
                        <HeaderTemplate>
                            <asp:Label ID="lblBadgeHead" runat="server" Text="Badge" Width="120px" ></asp:Label>
                        </HeaderTemplate>
                        <ItemTemplate>
                            
                           <asp:Label ID="lblBadgeItem" runat="server" Text='<%#  Eval ("Badge") %>' Width="120px" ></asp:Label>
                                                     
                        </ItemTemplate>

<HeaderStyle CssClass="gridRowStyle"></HeaderStyle>

<ItemStyle CssClass="gridRowStyle"></ItemStyle>
                    </asp:TemplateField>
                    
                    <asp:TemplateField>
                        <HeaderTemplate>
                            <asp:Label ID="lblFullNameHead" runat="server" Text="Name" Width="120px"></asp:Label>
                        </HeaderTemplate>
                        <ItemTemplate>
                        
                           <asp:Label ID="lblFullNameItem" runat="server" Text='<%#  ((DatabaseComponent.Persons)Container.DataItem).getFullName() %>' Width="120px"></asp:Label>
                                                    
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField>
                        <HeaderTemplate>
                            <asp:Label ID="lblPersonTypeHead" runat="server" Text="User type" Width="120px"></asp:Label>
                        </HeaderTemplate>
                        <ItemTemplate>
                            
                           <asp:Label ID="lblPersonTypeItem" runat="server" Text='<%#  ((DatabaseComponent.Persons)Container.DataItem).objPersonType.EmployeeTypeNameEN %>' Width="120px"></asp:Label>
                                                     
                        </ItemTemplate>
                    </asp:TemplateField>
                    
                    
                    
                    
                      
                   
                    
                    
                    
                    <asp:TemplateField>
                        <HeaderTemplate>
                                <asp:Label ID="lblActionsHead" runat="server" Text="Action" ></asp:Label>
                        </HeaderTemplate>
                        <ItemTemplate>
                           
                               
                                
                                 <asp:LinkButton ID="lnkReport" runat="server" CommandName="Edit" CommandArgument='<%# Container.DataItemIndex %>'   Text="View Report" CausesValidation="false"></asp:LinkButton>
                                  
                                                 
                        </ItemTemplate>
                        
                        
                    </asp:TemplateField>
                    
                    
                    
                    
                    
                        
                           
                        
               
                
                
                
                </Columns>
                
                
            </asp:GridView>
        </div>
        
        
        
        
        <div class="clearing"></div>
    
    </div>
    
    
    <div class="clearing"></div>


      <div runat="server" visible="false" id="dvDepartmentReport" class="aligning allWidthWithMargins  direction" style="margin-bottom:20px;margin-left:30px;margin-right:30px;font-size:14px;">
    
    
                
        <div class="floating direction aligning" style="width:300px;">
            <asp:TextBox ID="txtDepartmentSearch" runat="server" Width="300px"></asp:TextBox>
           
        </div>
        <div class="floating" style="font-size:1px;width:11px;height:1px;"></div>
        <div class="floating direction aligning" style="width:100px;">
            <asp:Button ID="btnDepartmentSearch" runat="server" Text="Search" 
                 BorderStyle="Solid" BorderColor="Orange" BackColor="DarkOrange" 
                ForeColor="White" onclick="btnDepartmentSearch_Click" />
        
        </div>
            
        
        
        <div class="clearing" style="height:10px"></div>

        <div class="aligning allWidthWithMargins floating direction">
            <asp:GridView DataKeyNames="ID" ID="gvDepartments" runat="server" 
                AutoGenerateColumns="False" AllowPaging="True" Font-Size="12px" 
                 Width="840px" onpageindexchanging="gvDepartments_PageIndexChanging" 
                onrowediting="gvDepartments_RowEditing" EnableModelValidation="True"  >
                <HeaderStyle HorizontalAlign="Center"/>

                <RowStyle HorizontalAlign="Center" />
                
                <EmptyDataTemplate>
                <div class="aligning floating direction" style="width:840px;">
                    <asp:Label ID="Label2" runat="server" Text="Label" >No Departments found</asp:Label> 
                    <br />
                    <br />
                    
                </div>
                    
                </EmptyDataTemplate>
                <Columns>
                    <asp:TemplateField HeaderStyle-CssClass="gridRowStyle" ItemStyle-CssClass="gridRowStyle">
                        <HeaderTemplate>
                            <asp:Label  runat="server" Text="Code" Width="120px" ></asp:Label>
                        </HeaderTemplate>
                        <ItemTemplate>
                            
                           <asp:Label  runat="server" Text='<%#  Eval ("OrgCode") %>' Width="120px" ></asp:Label>
                                                     
                        </ItemTemplate>

<HeaderStyle CssClass="gridRowStyle"></HeaderStyle>

<ItemStyle CssClass="gridRowStyle"></ItemStyle>
                    </asp:TemplateField>
                    
                    <asp:TemplateField>
                        <HeaderTemplate>
                            <asp:Label  runat="server" Text="Name" Width="120px"></asp:Label>
                        </HeaderTemplate>
                        <ItemTemplate>
                        
                           <asp:Label  runat="server" Text='<%# Eval ("NameEN") %>' Width="120px"></asp:Label>
                                                    
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField>
                        <HeaderTemplate>
                            <asp:Label  runat="server" Text="Organization Place" Width="120px"></asp:Label>
                        </HeaderTemplate>
                        <ItemTemplate>
                            
                           <asp:Label  runat="server" Text='<%#  ((DatabaseComponent.OrgnizationChart)Container.DataItem).objParent.NameEN %>' Width="120px"></asp:Label>
                                                     
                        </ItemTemplate>
                    </asp:TemplateField>
                    
                    
                     <asp:TemplateField>
                        <HeaderTemplate>
                            <asp:Label   runat="server" Text="Type" Width="120px"></asp:Label>
                        </HeaderTemplate>
                        <ItemTemplate>
                        
                           <asp:Label   runat="server" Text='<%#  ((DatabaseComponent.OrgnizationChart)Container.DataItem).objChartType.TypeNameEN %>' Width="120px"></asp:Label>
                                                    
                        </ItemTemplate>
                    </asp:TemplateField>
                    
                      
                   
                    
                    
                    
                    <asp:TemplateField>
                        <HeaderTemplate>
                                <asp:Label  runat="server" Text="Action" ></asp:Label>
                        </HeaderTemplate>
                        <ItemTemplate>
                           
                               
                                
                                 <asp:LinkButton ID="lnkReport" runat="server" CommandName="Edit" CommandArgument='<%# Container.DataItemIndex %>'   Text="View Report" CausesValidation="false"></asp:LinkButton>
                                  
                                                 
                        </ItemTemplate>
                        
                        
                    </asp:TemplateField>
                    
                    
                    
                    
                    
                        
                           
                        
               
                
                
                
                </Columns>
                
                
            </asp:GridView>
        </div>
        
        
        
        
        <div class="clearing"></div>
    
    </div>





    <!--


    




    -->


    <div class="clearing"></div>


    <div runat="server" visible="false" id="dvReportsArea" class="aligning allWidthWithMargins  direction" style="margin-bottom:20px;margin-left:30px;margin-right:30px;font-size:14px;">
        <div class="allWidthWithMargins">
                <div class="floating aligning direction" style="width:200px;">
                    <asp:Label ID="lblIsCompleted"  runat="server" Text="Completed *"></asp:Label>
                </div>        
        
        
               <div class="floating aligning direction" style="width:400px;">
                   <asp:CheckBox ID="chkCompleted" runat="server" Checked="false" />
                
           
                </div>
            


            <div class="clearing"></div>
        </div>
    
    
        <div class="clearing" style="height:10px;"></div>
    </div>


    <div class="clearing"></div>
    
    
    <div class="aligning direction" style="width:450px;margin-left:30px;margin-right:30px;">
            <div class="aligning direction" style="float:right;">
                
                <asp:Button ID="btnShow" runat="server" Text="Show" 
                     BorderStyle="Solid" BorderColor="Orange" BackColor="DarkOrange" 
                    ForeColor="White" onclick="btnShow_Click"/>
                <div class="clearing"></div>
            </div>

            <div style="float:right;font-size:1px;width:5px;height:1px"></div>

        
            <div class="aligning direction" style="float:right">
            </div>
            
       

             
        

            
            <div class="clearing"></div>
        
            
        </div>
    
    
    <div class="clearing" style="width:1px;height:20px;"></div>


     <div class="aligning allWidthWithMargins  direction" style="margin-top:100px;margin-left:30px;margin-right:30px;overflow:auto;">
            
           <%-- <CR:CrystalReportViewer runat="server" AutoDataBind="true" ID="crvReport"  >
        </CR:CrystalReportViewer>--%>
        
        <iframe id="ifReport" runat="server" enableviewstate="true" style="width:800px;height:1100px;display:none;" src=''></iframe>
        </div>
        

       

        <div class="clearing" style="width:1px;height:10px;"></div>


        <div class="aligning allWidthWithMargins direction" style="margin-left:30px;margin-right:30px;">
            <div class="aligning direction" style="float:right;">
                
                <asp:Button ID="btnPDF" runat="server" Text="PDF" 
                     BorderStyle="Solid" BorderColor="Orange" BackColor="DarkOrange" 
                    ForeColor="White" CausesValidation="false" onclick="btnPDF_Click"/>
                <div class="clearing"></div>
            </div>

            <div style="float:right;font-size:1px;width:5px;height:1px"></div>

        
            <div class="aligning direction" style="float:right">
                <asp:Button ID="btnExcel" runat="server" Text="Excel" CausesValidation="false" 
                    BorderStyle="Solid" BorderColor="Orange" BackColor="DarkOrange" 
                    ForeColor="White" onclick="btnExcel_Click"/>
            </div>
            
       

             
        

            
            <div class="clearing"></div>
        
            
        </div>


        



        <div class="clearing" style="width:1px;height:20px;"></div> 

    <div class="aligning allWidthWithMargins  direction">
            <asp:Label ID="lblError" runat="server" Text="" ForeColor="Red" style="margin-left:30px;" EnableViewState ="false"></asp:Label>
            <div class="clearing"></div>
            <asp:Label ID="lblResult" runat="server" Text="" ForeColor="Green" style="margin-left:30px;" EnableViewState="false"></asp:Label>
        
            <div class="clearing"></div>
        </div>
        
        <div class="clearing"></div>
        <div class="aligning allWidthWithMargins  direction">
            <asp:ValidationSummary ID="vsError" runat="server" />
            
            <div class="clearing"></div>
        </div>
        <div class="clearing"></div>

    

    <%--</ContentTemplate>
    <Triggers>
        
        <asp:PostBackTrigger ControlID="btnShow" />
        <asp:PostBackTrigger ControlID="crvReport" />
        <asp:PostBackTrigger ControlID="btnPDF" />
        <asp:PostBackTrigger ControlID="btnExcel" />
        <asp:PostBackTrigger ControlID="grdUsers" />
        <asp:PostBackTrigger ControlID="grdPersons" />
        <asp:PostBackTrigger ControlID="gvDepartments" />
    </Triggers>
    </asp:UpdatePanel>--%>
    
    
    

<%--<CR:CrystalReportSource id="rsReport" runat="server">
</CR:CrystalReportSource>--%>






</ContentTemplate>
 </asp:UpdatePanel>
    

</asp:Content>

